<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
	<title>アクセサ生成ツール</title>
</head>
<body>

<?php 

date_default_timezone_set('Asia/Tokyo');
mb_internal_encoding('UTF-8');

require_once __DIR__ . '/packages/creater.php';
$creator = new AccesserCreater();

$result = "";
if(isset($_POST["class"]) && strlen($_POST["class"])){
	$classStr = $_POST["class"];
	
	$creator->setMemberType(@$_POST["member_rule"]);
	$creator->setCreateType(@$_POST["setter"], @$_POST["getter"]);
	$creator->setAccesserType(@$_POST["accesser_rule"]);
	$creator->setOptions(@$_POST["addsetter"]);
	
	$result = $creator->create($classStr);
}


?>

<textarea rows="20" cols="70" name="class"><?php echo htmlspecialchars($result); ?></textarea>

</body>
</html>